package com.yqw.spring1219;

public class ArrayList {
	private Object[] data = new Object[10];
	private  int size;
	
	public void add(Object o) {
		if (size == data.length) {
			Object[] newData = new Object[size + (size + 1) >> 1];
			System.arraycopy(data,0, newData, 0, data.length);
			data = newData;
		}
		data[size] = o;
		size ++;
	}

}
